#pragma once

#ifdef WIN_PLATFORM
#include "PIHeaders.h"
#endif

#include <atlstr.h>
#include <vector>

using namespace std;

class AcronymDlg
{
public:
	enum Action
	{
		Process,
		Skip,
		Stop
	};

protected:
	static AVWindow gAVWindow;

private:
	CString* _pText;
	CString* _pCurrentValue;
	vector<CString>* _pValues;
	int* _newValueIndex;

	Action _action;
	
	static ADMListRef _list;

public:

	AcronymDlg(void);
	virtual ~AcronymDlg(void);

	Action DoModal(CString* pText, CString* pCurrentValue, vector<CString>* pValues, int* newValueIndex)
	{
		_pText = pText;
		_pCurrentValue = pCurrentValue;
		_pValues = pValues;
		_newValueIndex = newValueIndex;
		
		_action = Skip;
		
		DoModal(this);
		
		return _action;
	};

private:

	static void DoModal(AcronymDlg *pAcronymDlg);
	static ASErr ASAPI SettingsDialogOnInit(ADMDialogRef dialogRef);
	static ASErr ASAPI SetDialogDatabase(ADMDialogRef dialogRef);


	static void ASAPI OnDestroy (ADMDialogRef dialogRef);
	static void ASAPI OnAddButton (ADMItemRef itemRef, ADMNotifierRef notifierRef);
	static void ASAPI OnSetButton (ADMItemRef itemRef, ADMNotifierRef notifierRef);
	static void ASAPI OnSkipButton (ADMItemRef itemRef, ADMNotifierRef notifierRef);
	static void ASAPI OnStopButton (ADMItemRef itemRef, ADMNotifierRef notifierRef);
	static void ASAPI OnListClick (ADMItemRef itemRef, ADMNotifierRef notifierRef);

};
